package com.xiangyun.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.HashMap;
import java.util.Map;

@ControllerAdvice
public class GlobalConfig {
    @ModelAttribute("info")
    public Map<String,String> userInfo(){
        HashMap<String, String> map = new HashMap<>();
        map.put("username","罗贯中");
        map.put("gender","男");

        return map;
    }
}
